<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv= "X-UA-Compatible" content = "IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>博艺网-更新资料</title>
    <link rel="stylesheet" href="//res.wx.qq.com/open/libs/weui/1.1.1/weui.min.css">
    <link href="/common/css/weixin.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript" src="/common/js/jquery-1.8.2.min.js"></script>

    <script type="text/javascript">
        var countdown=60;
        function settime(obj) {
            if (countdown == 0) {
                obj.removeAttribute("disabled");
                obj.value="获取验证码";
                countdown = 60;
                return;
            } else {
                obj.setAttribute("disabled", true);
                obj.value="重新发送(" + countdown + ")";
                countdown--;
            }
            setTimeout(function() {
                        settime(obj) }
                    ,1000)
        }

        function get_validate_code(obj) {
            var mobile = $("#mobile").val();
            if (mobile.length != 11)
            {
                alert("手机号格式不正确!");
                return;
            }

            $.post("/sendValidMsg",{
                'mobile':mobile
            },function(data, status){});

            settime(obj);
        }
    </script>
</head>
<body>

<header class="bar bar-nav">
    <h1 class='title'>&nbsp;</h1>
</header>
<#--<div class="content">-->
    <form id="form" method="post" action="/weixin/submitMe">
        <input type="hidden" name="open_id" value="${open_id}">
        <input type="hidden" name="nickname" value="${nickname}">
        <input type="hidden" name="union_id" value="${union_id}">

        <div class="weui-cells weui-cells_form">
            <div class="weui-cell weui-cell_vcode">
                <div class="weui-cell__hd">
                    <label class="weui-label">手机号</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="tel" id="mobile" name="mobile" placeholder="请输入手机号">
                </div>
                <div class="weui-cell__ft">
                    <button class="weui-vcode-btn" id="btn" onclick="get_validate_code(this)">获取验证码</button>
                </div>
            </div>

            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">验证码</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="number" name="vcode" pattern="[0-9]*" placeholder="请输入验证码">
                </div>
            </div>

            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">密码</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input" type="password" name="password" placeholder="请输入密码">
                </div>
            </div>

            <div class="weui-btn-area">
                <button class="weui-btn weui-btn_primary" type="submit" id="showTooltips">确定</button>
            </div>
        </div>


    </form>
<#--</div>-->

</body>
</html>